<?php __e( doctype('xhtml1-trans') );?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php __e(OS_CRM_TITLE);?></title>

<?php
$meta = array(
        array('name' => 'robots', 'content' => 'noodp, noindex, nofollow'),
        array('name' => 'description', 'content' => OS_CRM_DESCP),
        array('name' => 'keywords', 'content' => OS_CRM_KEYWORDS),
        array('name' => 'robots', 'content' => 'no-cache'),
        array('name' => 'Content-type', 'content' => 'text/html; charset=utf-8', 'type' => 'equiv')
    );
__e( meta($meta) ); 
?>
<!-- CSS -->
<?php __e( link_tag( base_url() . 'css/bk/transdmin.css' ) ); ?>
<?php __e( link_tag( base_url() . 'css/fr/jquery-ui.css' ) ); ?>
<?php __e( link_tag( base_url() . 'js/facebox/facebox.css' ) ); ?>

<?php __e( link_tag( base_url() . 'images/favicon.ico', 'shortcut icon', 'image/ico' ) ); ?>

<!--[if IE 6]><link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url(); ?>css/bk/ie6.css" /><![endif]-->
<!--[if IE 7]><link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url(); ?>css/bk/ie7.css" /><![endif]-->

<!-- JavaScripts-->
<script language="javascript" type="text/javascript">
var base_url = '<?php __e( base_url()); ?>';
var site_url = '<?php __e( site_url()); ?>';
var cur_url = '<?php __e( current_url()); ?>';
</script>
<script language="javascript" type="text/javascript" src="<?php echo base_url(); ?>js/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="<?php echo base_url(); ?>js/jquery-ui.min.js"></script>
<script language="javascript" type="text/javascript" src="<?php echo base_url(); ?>js/facebox/facebox.js"></script>
<script type="text/javascript" src="<?php __e( base_url() ); ?>js/main.js"></script>

</head>

<body>
<div id="loadme"></div>
	<div id="wrapper">
    	<!-- h1 tag stays for the logo, you can use the a tag for linking the index page -->
      <h1><a href="#"><div class="c1"><?php __e(OS_CRM_TITLE); ?></div><div class="c2">&nbsp;&nbsp;beta</div></a></h1>
        
        <!-- You can name the links with lowercase, they will be transformed to uppercase by CSS, we prefered to name them with uppercase to have the same effect with disabled stylesheet -->
        <ul id="mainNav">
			<?php if(__admin_loggedin()){ $usr_info = __loggedin_info('adminusr_info'); ?>	
        	<li><a href="<?php echo site_url('siteadmin/dashboard'); ?>" class="active" title="DASHBOARD">DASHBOARD</a></li> <!-- Use the "active" class for the active menu item  -->
          <li><a href="<?php echo site_url(''); ?>" title="WEBSITE" target="_blank">WEBSITE</a></li>
        	<li class="logout"><a href="<?php echo site_url('siteadmin/logout'); ?>" title="LOGOUT">LOGOUT</a></li>
			<li class="logout"><a href="<?php echo site_url('siteadmin/logout'); ?>" title="Welcome user, <?php echo $usr_info['usr_email'] ?>"><?php echo $usr_info['usr_email'] ?></a></li>	
			<?php }else{ ?>
			<li class="logout"><a href="<?php echo site_url('siteadmin'); ?>" title="LOGIN">LOGIN</a></li>
			<?php }  ?>
        </ul>
        <!-- // #end mainNav -->
        
        
        
        
    <div id="containerHolder">
      <div id="container">
        
        
        <div id="sidebar">
          <ul class="sideNav">
            <?php 
            if(__admin_loggedin()){ 
               __e(build_admin_links());             
            }else{ ?>
            <li><a href="#" class="active">Please Login</a></li>
            <li><a href="<?php __e(site_url());?>">Frontend Site</a></li>
            <?php }  ?>
          </ul>
          <!-- // .sideNav -->
        </div>    
        
        
        <!-- // #sidebar -->